//
//  FirstView.m
//  eNew
//
//  Created by lanou3g on 15-4-29.
//  Copyright (c) 2015年 蓝鸥科技. All rights reserved.
//

#import "FirstView.h"

@implementation FirstView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor = [UIColor whiteColor];
        [self addAllViews];
    }
    return self;
}

#pragma mark - 添加全部控制器
- (void)addAllViews
{
    UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout new]autorelease];
    layout.itemSize = CGSizeMake(166, 133);
    layout.minimumInteritemSpacing = 20;
    layout.minimumLineSpacing = 10;
    layout.sectionInset = UIEdgeInsetsMake(20, 10, 20, 10);
    self.collectionView = [[UICollectionView alloc] initWithFrame:self.frame collectionViewLayout:layout];
    _collectionView.backgroundColor = [UIColor whiteColor];
    [self addSubview:_collectionView];
}



@end
